package com.tianji.upload.param;

import com.tianji.upload.enum1.BucketNameEnum;
import lombok.Data;
import lombok.extern.slf4j.Slf4j;

import java.io.InputStream;
import java.io.Serializable;

/**
 * @ClassName S3SdkPutParam
 * @Description 京东对象存储文件上传请求对象
 * @Author yuwei
 * @Date 2020/7/16 20:03
 * @Version 1.0
 */
@Slf4j
@Data
public class S3SdkPutParam implements Serializable {
    private static final long serialVersionUID = -1623344721169781744L;
    /**
     * 输入流
     */
    private InputStream inputStream;
    /**
     * 上传空间
     */
    private BucketNameEnum bucketNameEnum;
    /**
     * 文件名
     */
    private String fileName;
    /**
     * 上传文件大小
     */
    private Long contentLength;

    public S3SdkPutParam(InputStream inputStream, BucketNameEnum bucketNameEnum, String fileName, Long contentLength) {
        this.inputStream = inputStream;
        this.bucketNameEnum = bucketNameEnum;
        this.fileName = fileName;
        this.contentLength = contentLength;
    }

    private S3SdkPutParam(){}
}
